//
//  KmlPlacemarkViewController_iPad.m
//  Tazama NGO
//
//  Created by Jack Sheriff on 11/8/11.
//  Copyright (c) 2011 The MITRE Corporation. All rights reserved.
//

#import "KmlPlacemarkViewController_iPad.h"

@implementation KmlPlacemarkViewController_iPad

@synthesize webView;
@synthesize htmlContent;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    
    UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)];
	self.navigationItem.rightBarButtonItem = doneButton;
	[doneButton release];
    
    //    [webView loadHTMLString:htmlContent baseURL:[NSURL URLWithString:@"http://icnet-test.mitre.org"]];
    [webView loadHTMLString:htmlContent baseURL:[NSURL URLWithString:nil]];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
	return YES;
}

-(IBAction)donePressed:(id)sender {
    [self dismissModalViewControllerAnimated:YES];
}


@end
